package com.hurl.waguji.base;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.hurl.waguji.base.dao.HibernateService;
import com.hurl.waguji.persistence.DmGplxBO;

public class DmbService {
	private static Map<String,String> gplxMap = new HashMap<String,String>();
	static{
		init();
	}
	
	private static void init(){
		List<DmGplxBO> list = (List<DmGplxBO>)HibernateService.getDao().createCriteria(DmGplxBO.class).list();
		for(DmGplxBO bo : list){
			gplxMap.put(bo.getDm(), bo.getMc());
		}
	}
	
	public static String getGplx(String gplxDm){
		return gplxMap.get(gplxDm);
	}
}
